2.20.3. Response
Field | Description | Type |
status | success | error | |
code | Error code | Integer |
docStatus | 0 - invoice not closed, 1 - invoice closed | Integer |
printTime | Date and time of document closing, format: yyyy-MM-dd hh:mm:ss | String |
fiscalID | Fiscal document code (use for returns) | String |
fiscalNum | Document number | String |
items [{...}] | Array | |
totalPayments [{...}] | Array |
items
structure​
Field | Description | Type |
itemId | Item code in the accounting system | Integer |
itemCodeType | Item code type in the accounting system (optional) | Integer |
itemName | Item name | Integer |
itemAttr | Additional attributes for the item (1 - prepayment service), (optional) | Integer |
itemUnit | Unit of measurement (optional) | Integer |
itemQty | Quantity * 1000 | Integer |
itemPrice | Price from the price list in kopecks | Integer |
itemFinalPrice | Price with discount in kopecks | Integer |
itemAmount | Amount to be paid in kopecks | Integer |
itemFinalAmount | Amount to be paid in kopecks | Integer |
discount | Discount amount in kopecks (optional) | Integer |
discountPrc | Discount percentage (optional) | Numeric |
totalPayments
structure​
Field | Description | Type |
code | Payment type code | String |
amount | Payment amount in kopecks | Integer |
rrn | Payment transaction number from the bank terminal | String |
auth | Authorization code | String |
cardNum | Card number | String |
checkNum | Check number | String |
Response structure​
{
"status": "success" | "error",
"code": "integer, error code",
//0 - no error
//1 - authorization error
//2 - incorrect JSON format
//3 - missing required parameters
"docStatus": "integer",
//0 - invoice not closed
//1 - invoice closed
"printTime": "string, date and time of document closing, format: yyyy-MM-dd hh:mm:ss",
"fiscalID": "string, fiscal document code (use for returns)",
"fiscalNum": "string, document number",
"items": [
{
"itemId": "string, item code in the accounting system",
"itemCodeType": "item code type in the accounting system, optional",
"itemName": "string, item name",
"itemAttr": "integer, additional attributes for the item (1 - prepayment service), optional",
"itemUnit": "unit of measurement, optional",
"itemQty": "integer, quantity * 1000",
"itemPrice": "integer, price from the price list in kopecks",
"itemFinalPrice": "integer, price with discount in kopecks",
"itemAmount": "integer, amount from the price list in kopecks",
"itemFinalAmount": "integer, amount to be paid in kopecks",
"discount": "integer, discount amount in kopecks, optional",
"discountPrc": "numeric, discount percentage, optional"
}
],
"totalPayments": [ "Array of document payments",
{
"code": "string, payment type code",
"amount": "integer, payment amount in kopecks",
"rrn": "string, payment transaction number from the bank terminal",
"auth": "string, authorization code",
"cardNum": "string, card number",
"checkNum": "string, check number"
}
]
}